home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Think Class Libraries / WASTE TCL 1.8 / WASTE TCL 1.8 ƒ / CWASTEEditTask.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-12  |  1.7 KB  |  74 lines  |  [TEXT/MMCC]

  1. /*
  2.  *    File:        CWASTEEditTask.h
  3.  *    System:        Mark's Class Library
  4.  *    Evironment:    MacOS 7.0/THINK C 7.0/TCL 2.0
  5.  *    Author:        Mark Alldritt
  6.  *
  7.  *
  8.  *        Copyright © 1994    All Rights Reserved
  9.  *        Mark Alldritt
  10.  *        1571 Deep Cove Road
  11.  *        N. Vancouver, B.C. CANADA
  12.  *
  13.  *    
  14.  *    Notes:
  15.  *
  16.  *    none.
  17.  *
  18.  *
  19.  *    Edit History:
  20.  *
  21.  *    V1-0.0    Mark Alldritt    10-May-1994
  22.  *    - Initial version of module.
  23.  *  V1.0.1  Modifications by Dan Crevier to TCL 2.0
  24.  *  V1.0.2  Added code by Mark Alldritt for undo/redo
  25.  *
  26.  *            Adapted to THINK C / TCL 1.1.3     (Roms, 95/11/08)
  27.  */
  28.  
  29. #define _H_CWASTEEditTask
  30. #include "CTextEditTask.h"
  31.  
  32. class CWASTEText;
  33.  
  34. class CWASTEEditTask : public CTextEditTask
  35. {
  36. public:
  37.  
  38. #ifndef THINK_C
  39.                      CWASTEEditTask(CWASTEText *aTextPane, long anEditCmd, short firstTaskIndex);
  40.                      ~CWASTEEditTask();
  41. #else
  42.     void            IWASTEEditTask(CWASTEText *aTextPane, long anEditCmd, short firstTaskIndex);
  43.     virtual void    Dispose(void);
  44. #endif // THINK C
  45.  
  46. /*    virtual void     Undo(void);   */
  47. /*    virtual void     Redo(void); */
  48.     
  49.     // hack 'cause I needed it -- DWC
  50.     
  51. #ifndef THINK_C
  52.     tTextRange        *GetInserted(void) { return &inserted; };
  53. #else
  54.     tTextRange        *GetInserted(void);
  55. #endif // THINK_C
  56.  
  57. protected:
  58.  
  59.     StScrpHandle    origStyleScrap;        /* original styles on clipboard */
  60.     StScrpHandle    deletedStyles;        /* styles of original text    */
  61.     StScrpHandle    insertedStyles;        /* styles of inserted text    */
  62.     
  63.     virtual void     DoBackspace(void);
  64.     virtual void     DoFwdDelete(void);
  65.  
  66.     virtual void     SaveRange(tRangeSelector whichRange);
  67.     virtual void     RestoreRange(tRangeSelector whichRange, Boolean killData);
  68.     virtual void     StoreToClip(tClipSelector whichClip);
  69.     
  70.     virtual Boolean CheckNewStyle(ScrpSTElement *scrapEl, 
  71.                                   StScrpHandle styleH, Boolean atStart);
  72.  
  73. };
  74.